import 'package:flutter/material.dart';
import 'package:moose_app/core/utils/navigate_util.dart';
import 'package:moose_app/ui/screens/search/search_screen.dart';
import 'package:moose_app/ui/widgets/icon_button.dart';
import 'package:moose_app/ui/widgets/search/search_input_view.dart';

import 'home_body.dart';

/// 主页
class ATHHomeScreen extends StatefulWidget {
  @override
  _ATHHomeScreenState createState() => _ATHHomeScreenState();
}

class _ATHHomeScreenState extends State<ATHHomeScreen>
    with SingleTickerProviderStateMixin {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        elevation: 0,
        title: ATHSearchInputView(
          press: () {
            ATHNavigator.pushFromRight(context, ATHSearchScreen.routeName);
          },
        ),
        leading: ATHIconButton(
          iconPath: "assets/icons/icon_location.svg",
          press: () {},
        ),
      ),
      body: ATHHomeBody(),
    );
  }
}
